package com.ruibang.glass.portal.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruibang.glass.common.domain.DictInfo;
import com.ruibang.glass.portal.domain.*;
import com.ruibang.glass.portal.entity.UserEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface UserMapper extends BaseMapper<UserEntity> {

    UserEntity getUserById(@Param("userId") String userId);

    UserEntity getUserByIdAndFaceToken(@Param("userId") String userId);

    List<UserEntity> getUserList(IPage<UserEntity> page, @Param("param") UserPageParams params);

    void deleteByUserId(@Param("userId") String userId);

    UserEntity getUserByLoginName(String loginName);

    void setClientId(@Param("userId") String userId, @Param("cid") String cid);

    UserEntity getUserByPhone(@Param("phoneNum") String phoneNum);

    List<DictInfo> getUserNamesByUserIds(@Param("userIds") List<String> userIds);

    List<String> getUserPhones(@Param("userIds") List<String> userIds);

    String getExistCode(@Param("operateCode") String operateCode);

    void updateByUserId(@Param("code") String code, @Param("userId") String userId);

    List<UserPhone> getUserPhonesByIds(@Param("userIds") List<String> userIds);

    String checkUser(@Param("userId") String userId);

    List<String> getUserByClientId(@Param("clientId") String clientId);


    List<UserEntity> getUserByIds(@Param("userIds") List<String> userIds);

    List<UserEntity> getUserByDeptIds(@Param("deptIds") List<String> deptIds);

    List<UserEntity> getUserByDeptId(@Param("deptId") String deptId);
}
